// NetProtocl.cpp: implementation of the CNetProtocl class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "GameStart.h"
#include "NetProtocl.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CNetProtocl* CNetProtocl::m_pInstance=NULL;
CNetProtocl::CNetProtocl()
{

}

CNetProtocl::~CNetProtocl()
{

}

CNetProtocl* CNetProtocl::CreateInstance()
{
	if(m_pInstance!=NULL)
	{
		delete m_pInstance;
		m_pInstance=NULL;
	}
	return m_pInstance;
}

lpNetExchange CNetProtocl::CreateNetProtocl(em_NetExchangeType em_Type)
{
	lpNetExchange pExchange=new NetExchange;
	switch(em_Type)
	{
		case em_NetExchangeLogin:
			{
				pExchange->m_emExchangeType=em_NetExchangeLogin;
			}
			break; 
		default :
			int i=0;
			break;
	}
	if(pExchange->m_emExchangeType==em_NetExchangeNULL)
	{
		delete pExchange;
		pExchange=NULL;
	}
	return pExchange;
}
